#!/bin/bash

umask 0077

SCRIPT_PATH=$(cd "$(dirname "$0")" && pwd)
. ${SCRIPT_PATH}/log_util.sh
. ${SCRIPT_PATH}/common.sh

function main()
{
    crl_dir=$(get_cert_dir)
    crl_file="$crl_dir/FDCrl.crl"
    crl_file_bak="$crl_dir/FDCrl.crl.bak"

    for file in $crl_file $crl_file_bak; do
        if [ -f "$file" ]; then
            rm -f $file > /dev/null 2>&1
            logger_Info "delete $(basename $file), ret $?"
        fi
    done

    logger_Info "delete CRL done"
    return 0
}

main
RESULT=$?
exit $RESULT
